<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>demo3-rem</title>
    <style>
        /* html,
        body {
            font-size: 10px;
        } */

        /* 
            rem 是以根元素的font-size的值为单位值的
            默认情况下 1rem = 16px
        */
        .con {
            width: 20rem;
            height: 20rem;
            background-color: aqua;
            margin: 0 auto;
        }
    </style>
</head>

<body>
    <div class="con"></div>
</body>

</html>